<#assign className = table.className>   
<#assign classNameLower = className?uncap_first> 

package ${basepackage}.service;


import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ${basepackage}.model.${className};
import ${basepackage}.mapper.${className}Mapper;




<#include "/java_imports.include">
@Service("${classNameLower}Service")
public class ${className}Service  {

	protected final Logger logger = LoggerFactory.getLogger(${className}Service.class);

   	@Autowired
    private ${className}Mapper  ${classNameLower}Mapper;

	/**
	 * All rights Reserved, Designed By Kiven_Lu
	 * @Description: (查询对象集合)
	 * @author: Kiven_Lu
	 * @version V1.0
	 *
	 */
	public List<${className}> queryByCondition(${className} ${classNameLower}){
		return ${classNameLower}Mapper.queryByCondition(${classNameLower});
	};

	/**
	 * All rights Reserved, Designed By Kiven_Lu
	 * @Description: (根据主键查询对象)
	 * @author: Kiven_Lu
	 * @version V1.0
	 *
	 */
	public ${className} queryByPrimaryKey(String key){
		return ${classNameLower}Mapper.queryByPrimaryKey(key);
	};

	/**
	 * All rights Reserved, Designed By Kiven_Lu
	 * @Description: (新增单个对象)
	 * @author: Kiven_Lu
	 * @version V1.0
	 *
	 */
	public void insert(${className} ${classNameLower}){ ${classNameLower}Mapper.insertSelective(${classNameLower});};
	/**
	 * All rights Reserved, Designed By Kiven_Lu
	 * @Description: (修改单个对象)
	 * @author: Kiven_Lu
	 * @version V1.0
	 *
	 */
	public void update(${className} ${classNameLower}){ ${classNameLower}Mapper.updateSelective(${classNameLower});};


	/**
	 * All rights Reserved, Designed By Kiven_Lu
	 * @Description: (根据主键删除对象)
	 * @author: Kiven_Lu
	 * @version V1.0
	 *
	 */
	public void delete(String pk){ ${classNameLower}Mapper.deleteByPrimaryKey(pk);};


}
